<template>
  <van-grid :column-num="2" :gutter="5">
    <van-grid-item v-for="item in list" :key="item.id"
      ><van-card
        :desc="item.desc"
        :title="item.title"
        :thumb="`http://liufusong.top:8080${item.imgSrc}`"
    /></van-grid-item>
  </van-grid>
</template>

<script>
import { groups } from '@/api/user'
export default {
  data () {
    return {
      list: []
    }
  },
  async created () {
    const { body } = await groups()
    this.list = body
    // console.log(body)
  }
}
</script>

<style lang="less" scoped>
.van-grid {
  .van-grid-item__content {
    padding: 0;
    height: 100%;
    .van-card {
      position: relative;
      padding: 0px;
      width: 100%;
      .van-card__content {
        position: absolute;
        top: 20px;
        left: 80px;
        font-size: 14px;

      }
      .van-card__thumb {
          width: 60px;
          height: 60px;
        }
    }
  }
}
</style>
``
